package com.hzncc.flowable_diboot.delivery.vo;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.delivery.entity.DeliveryProduct;
import com.hzncc.flowable_diboot.entity.SapCustomer;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 发货关联合同项目信息 VO定义
* @author MyName
* @version 1.0
* @date 2024-10-11
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class DeliveryProductListVO extends DeliveryProduct  {

    private static final long serialVersionUID = 1832199733783350274L;

    @BindDict(type = "contractType",field = "contractType")
    private String contractTypeLabel;

    /**
     * 合同签订单位 关联信息
     */

    @BindField(
            entity = SapCustomer.class,
            field = "name",
            condition = "this.recipient = id"
    )
    private String recipientLabel;

    /**
     * 签订单位 关联信息
     */

    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.signer = id"
    )
    private String signerLabel;

    /**
     * 销售区域 关联字典选项
     */
    @BindDict(
            type = "salesArea",
            field = "salesTerritory"
    )
    private LabelValue salesTerritoryLabel;

    /**
     * 交（提）货时间 关联字典选项
     */
    @BindDict(
            type = "deliveryTimeOfTheSalesContract",
            field = "deliveryTime"
    )
    private LabelValue deliveryTimeLabel;

    /**
     * 机床类型 关联字典选项
     */
    @BindDict(
            type = "salesContactMachineToolType",
            field = "machineToolType"
    )
    private LabelValue machineToolTypeLabel;

    /**
     * 业务板块 关联字典选项
     */
    @BindDict(
            type = "contractBusinessModel",
            field = "businessModel"
    )
    private LabelValue businessModelLabel;

    /**
     * 档次 关联字典选项
     */
    @BindDict(
            type = "salesContractGrade",
            field = "grade"
    )
    private LabelValue gradeLabel;

    /**
     * 账户分配
     */
    @BindDict(
            type = "accountAssignment",
            field = "accountAssignment"
    )
    private LabelValue accountAssignmentLabel;

    @BindDict(
            type = "province",
            field = "province"
    )
    private String provinceLabel;

    @BindDict(
            type = "city",
            field = "city"
    )
    private String cityLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}